Learn how to track click and conversion analytics in Magento with the Algolia extension.
clickAnalytics=true
to every search.
The default for this setting is No.
data-objectid
and data-position
attributes.
This default DOM selector is .ais-Hits-item a.result, .ais-InfiniteHits-item a.result
.
3.14
Algolia tracks both types of conversions.
To do this, set Enable Click Analytics to Yes:
After making this change, save your settings and clear your configuration cache.
Conversions are determined as follows:
Conversion types | Description |
---|---|
Add to cart | A conversion event is triggered as soon as a user clicks the Add to cart button. This can either be on the search results or the product page. |
Place order | A conversion event is triggered when a user lands on the Checkout Successful page. |
queryID
, objectID
, and indexName
parameters.
You need to include these parameters for your clicks and conversions to work.
For better SEO, you should use canonical link meta tags for your product pages.
To enable canonical links, go to Stores > Configuration > Catalog > Catalog and set Use Canonical Link Meta Tag For Products to Yes.
If you’re using an alternative method to track the queryID
, objectID
, and indexName
parameters for your conversion events,
you can remove the URL parameters by editing the
common.js
file.
queryID
parameter.
As best SEO practice, use canonical links for your product pages.
Enable this setting by going to Stores > Configuration > Catalog > Catalog > Search Engine Optimization > Use Canonical Link Meta Tag For Products in your store’s Admin
3.14
of the extension supports revenue analytics for qualifying plans.
When conversion tracking is enabled, Magento also sends revenue data with all Add to cart and Place order conversion events.
Revenue data sent to Algolia takes into account any discounts or special pricing that may apply.
Discounts are applied to conversion event types as follows:
Add to Cart | Place Order | |
---|---|---|
Special price | ||
Catalog price rule | ||
Cart price rule | ||
Customer group pricing |
data-objectid
attribute (unique product identifier).
The default is .action.primary.tocart
.